﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Crm.Sdk.Metadata;

namespace SalesTracker.Tools.EntityComparer.Lib
{
    public class EntityAttributes
    {
      
        public EntityAttributes(Microsoft.Crm.Sdk.CrmLabel crmLabel, string logicalName, AttributeType attributeType, AttributeMetadata attMetadata)
        {
            // TODO: Complete member initialization
            if (crmLabel.UserLocLabel != null)
                this.DisplayName = crmLabel.UserLocLabel.Label;
            else
                this.DisplayName = "";
            this.LogicalName= logicalName;
            this.DataType = attributeType;
            this.CrmAttribute = attMetadata;
        }
        public AttributeMetadata CrmAttribute { get; set; }
        public string DisplayName { get; set; }
        public string LogicalName { get; set; }
        public string PluralName { get; set; }
        public AttributeType DataType { get; set; }
    }
}
